$(function () {
//声明变量
    var record_datagrid =   $("#record_datagrid");
    /*var delete_btn = $("#delete_btn")*/
    record_datagrid.datagrid({
        url:'/record/recordGift.do',
        fit:true,
        fitColumns:true,
        toolbar:'#record_toolbar',
        pagination:true,
        rownumber:true,
        singleSelect:true,
        columns:[[
            {field:'id',checkbox:true},
            {field:'cardNumber',title:'会员卡号',width:80,formatter:function(value,row,index){
                    if(row.memberId){
                        return row.memberId.cardNumber;
                    }
                }},
            //id, m_cardNumber, name, until, number, totalPoint, recordTime
            {field:'name',title:'礼品名称',width:80},
            {field:'until',title:'礼品单位',width:80},
            {field:'number',title:'兑换数量',width:80},
            {field:'totalPoint',title:'本次兑换积分',width:80},
            {field:'recordTime',title:'兑换日期',width:80}
        ]]
    });

});
